from constants import *
import pygame, sys
from pygame.locals import *
# 字体组件
class TEXT :
    def __init__(self, text, color, size) :
        self.text = text
        self.color = color
        self.Font = pygame.font.Font(None, size)
        self.Text = self.Font.render(text, True, color)
    def changeText(self, text) :
        self.Text = self.Font.render(text, True, self.color)
    def changeColor(self, color) :
        self.Text = self.Font.render(self.text, True, color)
    def printText(self, pos, screen) :
        screen.blit(self.Text, pos)